<%@include file="/header/head.jsp" %>
<jsp:include page="/header/header.jsp">
	<jsp:param value="Edit Post - ${entity.title}" name="title"/>
</jsp:include>


<!-- end of menu_wrapper -->
<div id="content">
Edit Page

<spring:url var = "action" value='/post/save'/>

<form:form commandName="entity" action="${action}" method="post" >
		<c:if test="${!entity.new}">
            <form:hidden path="id"/>
		</c:if>
		<table width="60%" border="1" cellspacing="0">
		
            <tr>
                <td><strong>Title:</strong></td>
                <spring:bind path="title">
	                <td>
	                	<c:if test="${status.error}">
						<c:out value="${status.errorMessage}"/>
						</c:if>
	                	<form:input path="title"/>
	                </td>
	            </spring:bind>
            </tr>
            <tr>
            	<td><strong>Description:</strong></td>
                <spring:bind path="body">
                <td>
                	<c:if test="${status.error}">
					<c:out value="${status.errorMessage}"/>
					</c:if>
                	<form:textarea path="body"/>
                </td>
                </spring:bind>
            </tr>
            
            <tr>
                <td>&nbsp;</td>
                <td><input type="submit" name="submit" value="Submit"/></td>
            </tr>
        </table>
        <spring:bind path="owner">
        	    <input type="hidden" name="${status.expression}" value="${user.id}" />   
        </spring:bind>
    </form:form>
 </div>
 
 <%@include file="/footer/footer.jsp" %>